package com.zhengyuedong.bbs.core.service;

import java.util.List;

import com.zhengyuedong.bbs.core.dao.UserDAO;
import com.zhengyuedong.bbs.core.entity.User;

public class UserService {
	UserDAO userDAO;

	public String addUser(User user) {
		userDAO.save(user);
		return "success";
	}

	public List<User> findByLoginName(Object loginName) {
		return userDAO.findByLoginName(loginName);
	}

	public UserDAO getUserDAO() {
		return userDAO;
	}

	public void setUserDAO(UserDAO userDAO) {
		this.userDAO = userDAO;
	}

}
